how to use string length function in java